#pragma once

#include "NFServerComm/NFServerCommon/NFIDescStore.h"
#include "NFServerComm/NFServerCommon/NFIDescTemplate.h"
#include "NFLogicCommon/NFDescStoreMacrosDefine.h"
#include "NFLogicCommon/NFDescStoreTypeDefines.h"
#include "E_NpcBase.nanopb.h"
#ifndef MAX_NPCBASE_NPCLOCATIONDESC_NUM
#define MAX_NPCBASE_NPCLOCATIONDESC_NUM 238
#endif

class NpcLocationDesc : public NFI_DESC_TEMPLATE_MACRO(NpcLocationDesc, E_NpcLocation, EOT_CONST_NPCBASE_NPCLOCATIONDESC_DESC_ID, MAX_NPCBASE_NPCLOCATIONDESC_NUM)
public:
	NpcLocationDesc();
	virtual ~NpcLocationDesc();
	int CreateInit();
	int ResumeInit();
public:
	int Load(NFResDb *pDB) override;
	int LoadDB(NFResDb *pDB) override;
	int CheckWhenAllDataLoaded() override;
	std::vector<const E_NpcLocation*> GetDescByLocationGroupId(int64_t locationGroupId) const;
private:
	NFShmHashMultiMap<int64_t, uint64_t, MAX_NPCBASE_NPCLOCATIONDESC_NUM> m_locationGroupIdIndexMap;
};
